package com.tedu.springboot2302.entity;

import java.io.Serializable;

/**
 * 使用当前类的每一个实例来表示一个注册用户信息
 */
public class User implements Serializable { //需要实现Serializable才能被序列化
    private String username;
    private String password;
    private String nickname;
    private int age;

    //很多框架会用到无参构造器因此要将其提供出来
    public User() {
    }

    public User(String username, String password, String nickname, int age) {
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.age = age;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
